#ifndef AIINTERFACE_H_
#define AIINTERFACE_H_

#include <string>
#include <set>
#include <vector>

#include "AIInterfaceImp.h"
#include "Interfaces/GameListener.h"

#include "Objects/Player.h"
#include "Objects/Units/Unit.h"
#include "Objects/GameMap.h"
#include "Objects/Resource.h"

namespace OOInterface {

typedef std::set< ConstPlayerPtr > ConstPlayerSet;
typedef std::set< PlayerPtr > PlayerSet;

typedef std::set< ConstUnitPtr > ConstUnitSet;
typedef std::set< UnitPtr > UnitSet;

class AIInterface
{
public:
	AIInterface(AIInterfaceImp* impl);
	virtual ~AIInterface();

	virtual void attachAI( AIHandle* handle );

	virtual void sendMessage( const std::string& msg, Player* p = NULL, bool team = false);
	virtual bool giveResourcesTo( Player* p, Resource* resource, float amount);
	virtual bool giveUnitsTo( Player* p, ConstUnitSet* units);
	virtual const ConstPlayerSet& getPlayers();
	virtual const GameMap& getGameMap();

	virtual bool orderUnit( ConstUnitPtr unit, ConstCommandPtr command );


	virtual const ResourceList& getResourceTypes();


	virtual void addGameListener( GameListener* listener );
	virtual void removeGameListener( GameListener* listener );

	virtual CommandFactory& getCommandFactory();

private:
	AIInterfaceImp* _impl;
};

}

#endif /*AIINTERFACE_H_*/
